<?php

namespace App\Http\Model\Api;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Redis;
use App\Http\Model\AudioApi;
use App\Http\Model\Base;
use Exception;

class FinanceRechargeOrder extends Base
{
    protected $table = 'finance_recharge_order';
    protected $connection = "mysql_kkaudio";

    public function __construct(array $attributes = [])
    {
        parent::__construct($this->table, $attributes);
    }

    public static function checkIsRecharge(int $user_id) {
        return static::where('user_id', $user_id)
        ->where('status', 1)
        ->count();
    }
}